package cn.lzd.filter

import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.rdd.RDD

import scala.util.parsing.json.JSON

/**
  * Created by lzd on 2019/4/26.
  */
object CompanyFilter {
  def main(args: Array[String]): Unit = {
//    val sc = new SparkContext(new SparkConf().setMaster("local").setAppName("company-name-flag"))
//
//    val textFile: RDD[String] = sc.textFile("G:\\spark\\company.js")
//
////   textFile.map(_.split("\t",-1)(1).foreach((a)=>{println("============"+a)}))
//
//    val map: RDD[Array[String]] = textFile.map(_.split("\t",-1))
//    map.foreach(_.foreach((x)=>{x.toBuffer}))
//    println(map.toString())


    val str = "上海沅歆商贸有限公司\t[\"13658795422\"]";

    val split: Array[String] = str.split("\t",-1)
    println(split(1))

  }

}
